package com.tlgen.controller;

import com.tlgen.model.AjaxResult;
import com.tlgen.model.TableClass;
import com.tlgen.service.GenerateCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class GenerateCodeController {

    @Autowired
    GenerateCodeService generateCodeService;

    @PostMapping("/generateCode")
    public AjaxResult generateCode(@RequestBody List<TableClass> tableClassList) {
        return generateCodeService.generateCode(tableClassList, "E:\\generateCode");
    }
}
